import java.util.Scanner;
public class Test1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = "shuangti";
        for (int i = 0; i < 3; i++) {
            System.out.print("请输入用户名：");
            String user = scanner.next();
            System.out.print("请输入密码：");
            int password = scanner.nextInt();
            if(password == 123456 && user.equals(str)){
                System.out.println("welcome to shaugnti");
                break;
            }else{
                if(i<2) {
                    System.out.println("请重新输入");
                }else{
                    System.out.println("已超过3次，登录失败");
                }
            }
        }
    }
}
